<?php
session_start();
      if (isset($_SESSION['k_username'])) {
?>
<html>
<head>
<title >Logeo</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="../../css/style1.css" type="text/css" />
<style type="text/css">
<!--
.Estilo1 {
	font-size: 24px
}
-->
</style>
</head>
<body>
<div id="round"><div id="container">
 <div id="content" class="column span-14">
<?php
include ("conexion.inc.php");
$link = Conectarse();
mysql_select_db("gotica_sociosgotica",$link);
?>

<div align="center" class="Estilo1">Logins</div>
<table  width="100%" border="0" cellspacing="2" cellpadding="2" align="center">
<tr align="center" class="dataheader" >
<td>Usuario</td>
<td>Logeo a las</td>
<td>Ip</td>

</tr>

<?php 
$sql="SELECT * FROM logeoip ORDER BY idlogeoip DESC";
$result=mysql_query($sql,$link);
while ($row = mysql_fetch_array($result))
{
echo"<tr align=\"center\" class=\"data\" >";
echo "<td>".$row['idlogin']."</td>";
echo "<td>".$row['diahora']."</td>";
echo "<td>".$row['ip']."</td>";
echo "</tr>";}
?>
</table>
<div align="center" >
<a href="index2.php">Inicio</a></div>
<?php
if($_SESSION['grupo']==1){ ?>
<?php } ?>
</div>
</div>
</div>
</body>
</html>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>